package com.tongtong.middleware.blockchain.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tongtong.middleware.blockchain.entity.TblAssetExtEntity;
import com.tongtong.middleware.blockchain.mapper.TblAssetExtMapper;
import org.springframework.stereotype.Service;

@Service
public class TblAssetExtService extends ServiceImpl<TblAssetExtMapper, TblAssetExtEntity> {
    /**
     * 根据tokenId查询是否存在记录
     */
    public TblAssetExtEntity findByTokenId(String tokenId) {
        QueryWrapper<TblAssetExtEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("token_id", tokenId);
        return baseMapper.selectOne(queryWrapper);
    }
}
